#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "texteditor.h"
#include "terminal.h"
#include "tabmanager.h"
#include "codebuilding.h"
#include "backforward.h"
#include "tools.h"
#include <QMainWindow>
#include <QTextEdit>
#include <QMenu>
#include <QMenuBar>
#include <QLineEdit>
#include <QToolBar>
#include <QToolButton>
#include <QHBoxLayout>
#include <QWidget>
#include <QTabWidget>
#include <QSplitter>
#include <QBoxLayout>
#include <QFileDialog>
#include <QMessageBox>
#include <QTabBar>
#include <QLabel>

class TextEditor;

class TabManager;

class CodeBuilding;

class BackForward;


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    QTabWidget* tabWidget = nullptr;
    QToolBar *toolbar = nullptr;
    QToolBar* find_toolbar = nullptr;
    QToolBar* replace_toolbar = nullptr;
    QAction *file_save = nullptr;
    QAction *file_save_as = nullptr;
    QAction *back = nullptr;
    QAction *forward = nullptr;
    QAction *help_instruction = nullptr;
    QMenu *build = nullptr;
    Terminal *terminal = nullptr;
    TabManager* tabManager = nullptr;
    QAction *buildAndRunAction = nullptr;
    QAction *buildAction = nullptr;

private:
    QMenu *file = nullptr;
    QMenu *edit = nullptr;
    QMenu *help = nullptr;
    QMenu *mTerminal = nullptr;
    QMenu * tools = nullptr;
    QAction *file_new = nullptr;
    QAction *file_open = nullptr;
    QAction *file_exit = nullptr;
    QAction *edit_copy = nullptr;
    QAction *edit_paste = nullptr;
    QAction *edit_cut = nullptr;
    QAction *edit_selectAll = nullptr;
    QAction *build_compile = nullptr;
    QAction *build_run = nullptr;   
    QAction *build_compileAndRun = nullptr;
    QAction *find_and_replace = nullptr;
    QAction *showTerminal = nullptr;
    QAction *hideTerminal = nullptr;
    QAction *tools_compiler_option = nullptr;
    QAction *tools_settings = nullptr;
    QHBoxLayout* find_layout = nullptr;
    QHBoxLayout* replace_layout = nullptr;
    QWidget* find_widget = nullptr;
    QWidget* replace_widget = nullptr;
};

#endif // MAINWINDOW_H
